<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<%
  int totalPages=Integer.parseInt(request.getAttribute("totalPages").toString());
    int currentPage=Integer.parseInt(request.getAttribute("currentPage").toString());

  
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=emulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>微活动</title>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<meta content="telephone=no" name="format-detection">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<link rel="stylesheet" href="./css/phone.css" type="text/css"/>
<script type="text/javascript" src="./js/jquery-1.11.1.min.js"></script> 
<script type="text/javascript" src="./js/ht.js"></script>
<script type="text/javascript" src="./js/zhuanpanedit.js"></script>
</head>

<body>

<form method="post" name="f1" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="">
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="">
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>

function del(){
   var arr=new Array();
   var n=0;
   arr=document.getElementsByName('cbx');
   for(var i=0;i<arr.length;i++){
       if(arr[i].checked){
         n++;
       }
   }
   if(n>=1){
       location.href="javascript:f1.action='DeleteActivity.act?lujing=ShowActivity.act&lujing1=activitylist.jsp';f1.submit()";
   }else{
       alert("至少选择一项");
   }
}
</script>


<div class="aspNetHidden">

	<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="B9D32468">
	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="">
</div>
        <div class="wrapper">
            <div class="header_wrapper">
                <div class="ht_img">
                    <a href="./default.img"><img width="40" src=".${sessionScope.picpath}"></a>
                </div>
                <div class="btn-group btn-group-option pull-right">
                    <span style="color:#fff;"><%=session.getAttribute("username") %>，欢迎您</span>
                    <button type="button" class="btnn btn-default dropdown-toggle" data-toggle="dropdown">
                        <img src="./img/9.png">
                     </button>
                    <ul class="dropdown-menu pull-right" role="menu" style="display: none;">
                            <li><a href="./info.jsp"><img src="./img/q1.png">个人信息</a></li>
                            <li><a href="./touxiang.jsp"><img src="./img/q2.png">头像修改</a></li>
                            <li class="divider"></li>
                            <li><a id="lk" href="javascript:__doPostBack('ctl00$lk','')"><img src="./img/q3.png">退出</a></li>
                        </ul>
                </div>
                <div class="clr"></div>
             </div>
            <div class="page_wrapper">
                
    <div class="pageheader">
         <div class="pageicon pull-left">
             <a href="./default.jsp"><img src="./img/h-sy.png"></a>
         </div>
        <div class="media-body">
            <ul class="breadcrumb">
                    <li><a href="./default.aspx"><img src="./img/sy.png"></a></li>
                    <li>微活动</li>
            </ul>
        </div>
        <h4>微活动</h4>
    </div>
    <div class="content">
        <div class="btn_row">
            <div class="btn_row_left">
                <a class="alla" onclick="SelectAll(this)"><img src="./img/an1.png">全选</a>
                <a id="ContentPlaceHolder1_lbn" class="dela" onClick="del()"><img src="./img/an3.png">删除</a>
            </div>
            <div class="clear"></div>
        </div>
        <div class="table-responsive">
        <table cellspacing="0" cellspadding="0" class="datatable">
            <tbody><tr class="trbg">
                <td>选择</td>
                <td>标题</td>
                <td>发起人</td> 
                <td>发起人手机</td>   
                <td>查看参与人</td>           
                <td>添加时间</td>
            </tr>
                 <c:forEach var="act" items="${requestScope.beans}">
                    <tr>
                        <td><input id="ContentPlaceHolder1_rp_cbx_0" type="checkbox" name="cbx" value="${act.id }"><input type="hidden" name="ctl00$ContentPlaceHolder1$rp$ctl00$hd" id="ContentPlaceHolder1_rp_hd_0" value="51"></td>
                        <td>
                            <a href="ShowActivity.act?lujing=activity.jsp">${act.title}</a>
                        </td>
                        <td>${act.initiator}</td>
                        <td>${act.tel}</td>
                        
                        <td><a href="ShowActivity_user.a_user?lujing=activitylist1.jsp&activityId=${act.id}">查看</a></td>
                   
                        <td>${act.addTime}</td>
                    </tr>
                </c:forEach>
                   
                
        </tbody></table>        
        </div>       
        <div class="pagediv">            
            <a id="ContentPlaceHolder1_lbtnpritPage" class="aspNetDisabled" href="ShowActivity.act?lujing=activitylist.jsp&currentPage=<%=currentPage-1%>">&lt;</a>
             <span id="ContentPlaceHolder1_Span1" class="pages2"><a id="ContentPlaceHolder1_PageID_1" class="currentpage" href="ShowActivity.act?lujing=activitylist.jsp&currentPage=<%=currentPage%>"><%=currentPage %></a></span>
             <a id="ContentPlaceHolder1_lbtnNextPage" class="aspNetDisabled" href="ShowActivity.act?lujing=activitylist.jsp&currentPage=<%=currentPage+1%>">&gt;</a>
             
             <div class="pagecount">第<span id="ContentPlaceHolder1_labPage"><%=currentPage %></span>页/共<span id="ContentPlaceHolder1_LabCountPage"><%=totalPages %></span>页</div> 
         </div>
    </div>

            </div>
        </div>     
    </form>
    
</body>
</html>